/*
 * win32.h
 *
 *  Created on: 2012-8-30
 *      Author: yangentao@gmail.com
 */

#pragma once;

#include <windows.h>
#include "String.h"

namespace yet{
bool isKeyDown(int key);

long getTimeTick();

String getClipboardText();
bool setClipboardText(String s, bool unicode);
HGLOBAL DupMem(HGLOBAL hMem);

WString getOpenFileName();

//TODO isMainThread
bool isMainThread();
bool isMainThread(DWORD threadID);

string formatMessage(DWORD errCode);
wstring formatMessageW(DWORD errCode);

}
